<template>
    <div>
          <div class="my">
                <div class="myinfo">
                           <div class="myimg">
                                
                            </div>
                            <span class="infoname">{{name}}</span>
                </div>
                <div class="iconlist">
                            <div class="iconlist-content">
                                    <span>我的订单</span>
                            </div>
                            <div class="iconlist-content">
                                    <span>优惠券</span>
                            </div>
                            <div class="iconlist-content">
                                    <span>我的足迹</span>
                            </div>
                            
                            <div class="iconlist-content" @click="favorites">
                                    <span>我的收藏</span>
                            </div>
                           
                            <div class="iconlist-content" @click="address">
                                    <span>地址管理</span>
                            </div>
                             <div class="iconlist-content">
                                    <span>联系客服</span>
                            </div>
                            <div class="iconlist-content">
                                    <span>帮助中心</span>
                            </div>
                          
                            <div class="iconlist-content" @click="opinion">
                                    <span>意见反馈</span>
                            </div>
                          
                            <div class="iconlist-content">
                            </div>
                            <div class="iconlist-content-last">
                            </div>
                </div>
          </div>
    </div>
</template>

<script>
    export default {
        data() {
            return {
                name:"",
            }
        },
        created(){
            this.name = localStorage.getItem("openId")
        },
        methods: {
            favorites(){
                this.$router.push({path:"/favorites"})

            },
            opinion(){
                this.$router.push({path:"/opinion"})
            },
            address(){
                this.$router.push({path:"/address"})
            }
            
        },
    }
</script>

<style lang="scss" scoped>
        .my {
            width: 100%;
            .myinfo {
                width: 100%;
                height: 140px;
                background-color: #333;
                 box-sizing: border-box;
                 padding: 30px;
                 display: flex;
            }
            .myimg {
                width: 74px;
                height: 74px;
                background: url("../../../images/myinfo.png") no-repeat center;
                background-size: 80%;
                border-radius: 50%;
               
            }
            .infoname {
                height: 100%;
                line-height: 74px;
                color: #ccc;
                font-size: 16px;
            }
        }
        .iconlist {
            width: 100%;
            display: flex;
            justify-content: space-between;
            align-content: space-between;
            flex-wrap: wrap;
            // background-color: #fff;
            .iconlist-content {
                width: 123px;
                height: 72px;
                background-color: #fff;
                margin-top: 3px;
                span {
                    display: block;
                    width: 125px;
                    height: 100%;
                    text-align: center;
                    line-height: 72px;
                }
            }
           .iconlist-content-last {
               width: 123px;
               height: 0;
           }
        }
</style>